import request from '@/utils/request'

export const getQuestionListAPI = params => {
  return request({
    url: '/question/list',
    method: 'get',
    params
  })
}

export const deleteQuestionAPI = id => {
  return request({
    url: '/question/remove',
    method: 'post',
    data: {
      id
    }
  })
}

export const setQuestionStatusAPI = id => {
  return request({
    url: '/question/status',
    method: 'post',
    data: {
      id
    }
  })
}

export const addQuestionAPI = data => {
  return request({
    url: '/question/add',
    method: 'post',
    data
  })
}

export const gitQuestionOneAPI = id => {
  return request({
    url: '/question/one',
    method: 'post',
    data: {
      id
    }
  })
}

export const editQuestionAPI = data => {
  return request({
    url: '/question/edit',
    method: 'post',
    data
  })
}
